<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>E-Notify Administration</title>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag 'custom' %>
  <%= javascript_include_tag :defaults %>
  <%= active_scaffold_includes %>
</head>
<body>

	<div style="float:left;">
		<b><a href="/projects" style="text-decoration:none;color:#000000;">E-Notify Administration</a></b>&nbsp;&nbsp;
		<a href="http://i">Support</a>&nbsp;&nbsp;
		<a href="/enotify-resources/online_documentation/documentation/eNotify.htm" target="_blank">Online Help</a>
	</div>
	<div style="float:right;">
		<b><%= session[:username] +'@' + EMAIL_DOMAIN %></b> | 
		<%= link_to "Settings", :controller => :people, :username => session[:username], :action => :show %> | 
		<%= link_to "Logout", :controller => :login, :action => :logout %>
	</div>  	
<div id="header_bar" style="clear:both;border-bottom:solid #CCCCCC 1px;padding-top:5px;"></div>	

<h2><%= link_to 'Projects', :action => 'index', :controller => 'projects' %> 
<% if !@project.nil? %>  
  >> <%= link_to @project.name, :action => 'show', :controller => 'projects', :id => @project.id %>
<%end%>
<% if params[:controller] == 'teams' && params[:action] == 'for_project' %>   
  >> Teams
<%end%>
<% if params[:controller] == 'teams' && params[:action] == 'new' %>     						   						
	>> New Team
<% end -%>

<% if (params[:controller] == 'teams' || params[:controller] == 'owners')  && !@team.nil? && !@team.project.nil? %>
		>> <%= link_to("Teams", :controller => "teams", :action => "for_project", 
          						:id => @team.project) %>   
          						
    <% if params[:controller] == 'teams' %>     						   						
  		  >> <%= @team.manager.full_name %>'s team
	    
  	<% end %>	  
  	<% if params[:controller] == 'owners' %>      						
  		>> <%= link_to( @team.manager.full_name + "'s team", :action => "show", :id=> @team.id) %>
  	<% end %>
<%end%>

<% if params[:associations] == 'bug_lists' ||  params[:controller] == 'bug_lists' %>   >> Bug Lists <%end%>
<% if params[:controller] == 'administrators' %>
	<% if params[:action] == 'for_project' %>   
  		>> Administrators
	<% end -%>
	<% if params[:action] == 'new' %>   
  		>> <%= link_to( "Administrators", :action => "for_project", :id=> @project.id) %>
		>> Add New
	<% end -%>
<%end%>

<% if params[:controller] == 'projections' && params[:action] == 'index_for_bug_list' %>   
	  >> <%= link_to @bug_list.project.name, :action => 'show', :controller => 'projects', :id => @bug_list.project.id %> 
	>>  <%= link_to "Bug Lists", :action => 'for_project', :controller => 'bug_lists', :id => @bug_list.project.id %> 
	>> <%=h @bug_list.display_name %>
<% end -%>


<% if params[:controller] == 'projections' && params[:action] == 'index_for_team' %>   
	  >> <%= link_to @team.project.name, :action => 'show', :controller => 'projects', :id => @team.project.id %> 
	>>  <%= link_to "Teams", :action => 'for_project', :controller => 'teams', :id => @team.project.id %> 	
	>> <%= link_to @team.manager.full_name + "'s team", :action => 'show', :controller => 'teams', :id => @team.id %> 	

<% end -%>

<% if params[:controller] == 'projections' && params[:action] == 'show' %>   
	  >> <%= link_to @team.project.name, :action => 'show', :controller => 'projects', :id => @team.project.id %> 
	>>  <%= link_to "Teams", :action => 'for_project', :controller => 'teams', :id => @team.project.id %> 	
	>> <%= link_to @team.manager.full_name + "'s team", :action => 'show', :controller => 'teams', :id => @team.id %> 	
<% end -%>


<% if params[:controller] == 'projections' && params[:action] == 'edit_group' %>   
	  >> <%= link_to @team.project.name, :action => 'show', :controller => 'projects', :id => @team.project.id %> 
	>>  <%= link_to "Teams", :action => 'for_project', :controller => 'teams', :id => @team.project.id %> 	
	>> <%= link_to @team.manager.full_name + "'s team", :action => 'show', :controller => 'teams', :id => @team.id %>
<% end -%>

<% if params[:controller] == 'generations' %>   
	  >> <%= link_to @generation.project.name, :action => 'show', :controller => 'projects', :id => @generation.project.id %> 
      >> Generation
<% end -%>


</h2>
<p style="color: green"><%= flash[:notice] %></p>
<p style="color: yellow"><%= flash[:warning] %></p>
<%= yield  %>

</body>
</html>
